/**
 * Copyright (c) 2015—2017 Zerone.Co.Ltd. All rights reserved.
 */
package com.zerone.pay.merchant.repository.dao;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.acooly.module.jpa.EntityJpaDao;
import com.zerone.facade.merchant.enums.PayTrustsEnum;
import com.zerone.pay.merchant.repository.entity.MerchantPayEntity;

/**
 *
 * @author glassescat <a href="">零一零一科技</a>
 */
public interface MerchantPayDao extends EntityJpaDao<MerchantPayEntity, Long> {
	
	@Query(value = "SELECT t.* FROM merchant_pay t WHERE t.merchant_id= :merchantId AND t.payTrusts = :payTrusts",
			nativeQuery = true)
	MerchantPayEntity findMerchantPay(	@Param("merchantId") String merchantId,
										@Param("payTrusts") PayTrustsEnum payTrusts);
}
